home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Libraries / C Internet Config / IC Component Source ƒ / 68k Version ƒ / IC Call Glue.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-18  |  26.2 KB  |  1,107 lines  |  [TEXT/SPM ]

  1. /*
  2.     IC Call Glue.c
  3.     
  4.     Code to call the IC component.
  5.     
  6.     The glue comes in two forms, PPC only and PPC/68k glue.
  7.     
  8.     The PPC/68k glue provides the ICStart and ICStop routines for starting
  9.     and stopping the IC Component.
  10.     
  11.     The PPC glue provides the PPC code for the component interface (see note below).
  12.     
  13.     Important Note:
  14.         
  15.         This information (probably ;-) was derived by examining the tech note
  16.         "QT 05 - Component Manager version 3.0" which describes in detail how
  17.         to call a component from PPC code.  Before modifying any of this code,
  18.         you should take a look at that tech note.
  19.     
  20.     The author of this code was not mentioned before I (dhn) modified it.  Whoever
  21.     it is deserves most of the credit.
  22. */
  23.  
  24. #include <Types.h>
  25. #include <MixedMode.h>
  26. #include <Components.h>
  27.  
  28. #include "IC Types.h"
  29. #include "IC Component API.h"
  30.  
  31. /*
  32.     ICCStart
  33.     
  34.     Routine to initialize the IC component.  Will ensure the component manager
  35.     is available, open a default instance of the IC component, and start it up.
  36. */
  37. pascal ICError ICCStart(internetConfigurationComponent *inst, OSType creator){
  38.     ICError err,junk;
  39.     long response;
  40.     
  41.     *inst=(internetConfigurationComponent)0;
  42.     
  43.     if (Gestalt(gestaltComponentMgr,&response)==noErr){
  44.         *inst=(internetConfigurationComponent)OpenDefaultComponent(internetConfigurationComponentType,internetConfigurationComponentSubType);
  45.     }
  46.     
  47.     if (*inst==(internetConfigurationComponent)0){
  48.         return badComponentInstance;
  49.     } else {
  50.         err=ICCStartComponent(*inst,creator);
  51.         
  52.         if (err!=noErr){
  53.             junk=CloseComponent((ComponentInstance)*inst);
  54.             *inst=(internetConfigurationComponent)0;
  55.         }
  56.     }
  57.     
  58.     return err;
  59. }
  60.  
  61. /*
  62.     ICCStop
  63.     
  64.     Shuts down the IC component then closes it completely.
  65. */
  66. pascal ICError ICCStop(internetConfigurationComponent inst){
  67.     ICError err,err2;
  68.     
  69.     err=ICCStopComponent(inst);
  70.     err2=CloseComponent((ComponentInstance)inst);
  71.     
  72.     if (err==noErr)
  73.         err=err2;
  74.     
  75.     return err;
  76. }
  77.  
  78. /*
  79.     Only include the following code if we are compiling for the PPC!
  80. */
  81. #if defined(powerc) || defined (__powerc)
  82.  
  83. enum {
  84.     uppCallComponentProcInfo = kPascalStackBased
  85.         | RESULT_SIZE(kFourByteCode)
  86.         | STACK_ROUTINE_PARAMETER(1, kFourByteCode)
  87. };
  88.  
  89. /*
  90.     For an explanation of the inner workings of the following macros,
  91.     see the ICCFindConfigFile() function.
  92. */
  93.  
  94. /* A few macros to simplify the code (or does it make it more complex?  ;-) */
  95. #define CallComponentGlue(ptr) \
  96.     CallUniversalProc(CallComponentUPP,uppCallComponentProcInfo,(ptr))
  97.  
  98. #define PPC_Glue(parmsType) \
  99.     unsigned char flags; \
  100.     unsigned char size; \
  101.     short what; \
  102.     parmsType parms; \
  103.     internetConfigurationComponent inst
  104.  
  105. #define SetupGlue(var,sel,type,ic)\
  106.     (var).flags=0;\
  107.     (var).size=sizeof(type);\
  108.     (var).what=(sel);\
  109.     (var).inst=(ic)
  110.  
  111. #define PPC_VoidGlue \
  112.     unsigned char flags; \
  113.     unsigned char size; \
  114.     short what; \
  115.     internetConfigurationComponent inst
  116.  
  117. #define SetupVoidGlue(var,sel,ic)\
  118.     (var).flags=0;\
  119.     (var).size=0;\
  120.     (var).what=(sel);\
  121.     (var).inst=(ic)
  122.  
  123. #define SetGlueParm(var,ps,val) \
  124.     (var).parms.ps=(val)
  125.  
  126. /*
  127.     NOTE:
  128.     
  129.         For the PPC glue to work, the structures must be padded for 68k stacks.
  130.         
  131.         This means that everything must be padded on a word boundary.
  132.         
  133.         For types that are of odd number of bytes (i.e. char), you must add a
  134.         filler character after the type to pad it to a word.
  135.         
  136.         The list of types that need padding from the IC Types.h file are:
  137.         
  138.             (Booleans, chars, unsigned chars, ...)
  139.             ICPerm
  140. */
  141.  
  142. /*
  143.     ICCStartComponent
  144.     
  145.     PPC glue to call the component with the correct selector.
  146. */
  147. pascal ICError ICCStartComponent(internetConfigurationComponent inst, OSType creator){
  148.     ICError junk;
  149.     ICError err;
  150.  
  151. #pragma options align=mac68k
  152.     struct GlueParms {
  153.         OSType creator;
  154.     };
  155.     
  156.     typedef struct GlueParms GlueParms;
  157.     
  158.     struct ICCallGlue {
  159.         PPC_Glue(GlueParms);
  160.     };
  161.     
  162.     typedef struct ICCallGlue ICCallGlue;
  163. #pragma options align=reset
  164.     
  165.     ICCallGlue glue;
  166.     
  167.     if (inst==(internetConfigurationComponent)0) {
  168.         err = badComponentInstance;
  169.     } else {
  170.         SetupGlue(glue,kICCStart,GlueParms,inst);
  171.         
  172.         SetGlueParm(glue,creator,creator);
  173.         
  174.         err = CallComponentGlue(&glue);
  175.     }
  176.     
  177.     return err;
  178. }
  179.  
  180. /*
  181.     ICCStopComponent
  182.     
  183.     PPC glue to call the component with the correct selector.
  184. */
  185. pascal ICError ICCStopComponent(internetConfigurationComponent inst){
  186.     ICError err;
  187.     
  188. #pragma options align=mac68k
  189.     struct ICCallGlue {
  190.         PPC_VoidGlue;
  191.     };
  192.     
  193.     typedef struct ICCallGlue ICCallGlue;
  194. #pragma options align=reset
  195.     
  196.     ICCallGlue glue;
  197.     
  198.     SetupVoidGlue(glue,kICCStop,inst);
  199.     
  200.     err=CallComponentGlue(&glue);
  201.     
  202.     return err;
  203. }
  204.  
  205. /*
  206.     
  207.     PPC glue to call the component with the correct selector.
  208. */
  209. pascal ICError ICCFindConfigFile(internetConfigurationComponent inst, short count, ICDirSpecArrayPtr folders){
  210.     
  211. #pragma options align=mac68k
  212.     /*
  213.         For each of the glue routines, the GlueParms structure is defined.  It contains all of the parameters
  214.         required to call the component while passing the correct parameters.
  215.         
  216.         Note that the elements are listed in the reverse order of the parameters
  217.     */
  218.     struct GlueParms {
  219.         ICDirSpecArrayPtr folders;
  220.         short count;
  221.     };
  222.     
  223.     typedef struct GlueParms GlueParms;
  224.     
  225.     /*
  226.         Then the ICCallGlue structure is defined using the GlueParms structure to ensure the size
  227.         of the structure is set up correctly.
  228.     */
  229.     struct ICCallGlue {
  230.         PPC_Glue(GlueParms);
  231.     };
  232.     
  233.     typedef struct ICCallGlue ICCallGlue;
  234. #pragma options align=reset
  235.     
  236.     // A single variable named 'glue' is defined using the ICCallGlue type
  237.     ICCallGlue glue;
  238.     
  239.     // The glue variable is initialized using the selector, type, and instance of the component.
  240.     SetupGlue(glue,kICCFindConfigFile,GlueParms,inst);
  241.     
  242.     // Any parameters in the GlueParms structure are initialized
  243.     SetGlueParm(glue,folders,folders);
  244.     SetGlueParm(glue,count,count);
  245.     
  246.     // Call the componen UPP using a pointer to the glue variable.
  247.     return CallComponentGlue(&glue);
  248. }
  249.  
  250. /*
  251.     
  252.     PPC glue to call the component with the correct selector.
  253. */
  254. pascal ICError ICCFindUserConfigFile(internetConfigurationComponent inst, ICDirSpec *where){
  255. #pragma options align=mac68k
  256.     struct GlueParms {
  257.         ICDirSpec* where;
  258.     };
  259.     
  260.     typedef struct GlueParms GlueParms;
  261.     
  262.     struct ICCallGlue {
  263.         PPC_Glue(GlueParms);
  264.     };
  265.     
  266.     typedef struct ICCallGlue ICCallGlue;
  267. #pragma options align=reset
  268.     
  269.     ICCallGlue glue;
  270.     
  271.     SetupGlue(glue,kICCFindUserConfigFile,GlueParms,inst);
  272.     
  273.     SetGlueParm(glue,where,where);
  274.     
  275.     return CallComponentGlue(&glue);
  276. }
  277.  
  278. /*
  279.     
  280.     PPC glue to call the component with the correct selector.
  281. */
  282. pascal ICError ICCGeneralFindConfigFile(internetConfigurationComponent inst, Boolean search_prefs, Boolean can_create,
  283.         short count, ICDirSpecArrayPtr folders){
  284. #pragma options align=mac68k
  285.     struct GlueParms {
  286.         ICDirSpecArrayPtr folders;
  287.         short count;
  288.         Boolean can_create;
  289.         char filler1;
  290.         Boolean search_prefs;
  291.         char filler0;
  292.     };
  293.     
  294.     typedef struct GlueParms GlueParms;
  295.     
  296.     struct ICCallGlue {
  297.         PPC_Glue(GlueParms);
  298.     };
  299.     
  300.     typedef struct ICCallGlue ICCallGlue;
  301. #pragma options align=reset
  302.     
  303.     ICCallGlue glue;
  304.     
  305.     SetupGlue(glue,kICCGeneralFindConfigFile,GlueParms,inst);
  306.     
  307.     SetGlueParm(glue,search_prefs,search_prefs);
  308.     SetGlueParm(glue,filler1,0);
  309.     SetGlueParm(glue,filler0,0);
  310.     SetGlueParm(glue,can_create,can_create);
  311.     SetGlueParm(glue,count,count);
  312.     SetGlueParm(glue,folders,folders);
  313.     
  314.     return CallComponentGlue(&glue);
  315. }
  316.  
  317. /*
  318.     ICCChoseConfig
  319.     
  320.     PPC glue to call the component with the correct selector.
  321. */
  322. pascal ICError ICCChooseConfig(internetConfigurationComponent inst){
  323.     ICError err;
  324.     
  325. #pragma options align=mac68k
  326.     struct ICCallGlue {
  327.         PPC_VoidGlue;
  328.     };
  329.     
  330.     typedef struct ICCallGlue ICCallGlue;
  331. #pragma options align=reset
  332.     
  333.     ICCallGlue glue;
  334.     
  335.     SetupVoidGlue(glue,kICCChooseConfig,inst);
  336.     
  337.     err=CallComponentGlue(&glue);
  338.     
  339.     return err;
  340. }
  341.  
  342. /*
  343.     ICCChoseNewConfig
  344.     
  345.     PPC glue to call the component with the correct selector.
  346. */
  347. pascal ICError ICCChooseNewConfig(internetConfigurationComponent inst){
  348.     ICError err;
  349.     
  350. #pragma options align=mac68k
  351.     struct ICCallGlue {
  352.         PPC_VoidGlue;
  353.     };
  354.     
  355.     typedef struct ICCallGlue ICCallGlue;
  356. #pragma options align=reset
  357.     
  358.     ICCallGlue glue;
  359.     
  360.     SetupVoidGlue(glue,kICCChooseNewConfig,inst);
  361.     
  362.     err=CallComponentGlue(&glue);
  363.     
  364.     return err;
  365. }
  366.  
  367. /*
  368.     
  369.     PPC glue to call the component with the correct selector.
  370. */
  371. pascal ICError ICCGetConfigName(internetConfigurationComponent inst, Boolean longname,StringPtr name){
  372. #pragma options align=mac68k
  373.     struct GlueParms {
  374.         StringPtr name;
  375.         Boolean longname;
  376.         char filler;
  377.     };
  378.     
  379.     typedef struct GlueParms GlueParms;
  380.     
  381.     struct ICCallGlue {
  382.         PPC_Glue(GlueParms);
  383.     };
  384.     
  385.     typedef struct ICCallGlue ICCallGlue;
  386. #pragma options align=reset
  387.     
  388.     ICCallGlue glue;
  389.     
  390.     SetupGlue(glue,kICCGetConfigName,GlueParms,inst);
  391.     
  392.     SetGlueParm(glue,name,((StringPtr)name));
  393.     SetGlueParm(glue,longname,longname);
  394.     SetGlueParm(glue,filler,0);
  395.     
  396.     return CallComponentGlue(&glue);
  397. }
  398.  
  399. /*
  400.     
  401.     PPC glue to call the component with the correct selector.
  402. */
  403. pascal ICError ICCGetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref){
  404. #pragma options align=mac68k
  405.     struct GlueParms {
  406.         ICConfigRefHandle ref;
  407.     };
  408.     
  409.     typedef struct GlueParms GlueParms;
  410.     
  411.     struct ICCallGlue {
  412.         PPC_Glue(GlueParms);
  413.     };
  414.     
  415.     typedef struct ICCallGlue ICCallGlue;
  416. #pragma options align=reset
  417.     
  418.     ICCallGlue glue;
  419.     
  420.     SetupGlue(glue,kICCGetConfigReference,GlueParms,inst);
  421.     
  422.     SetGlueParm(glue,ref,ref);
  423.     
  424.     return CallComponentGlue(&glue);
  425. }
  426.  
  427. /*
  428.     
  429.     PPC glue to call the component with the correct selector.
  430. */
  431. pascal ICError ICCSetConfigReference(internetConfigurationComponent inst, ICConfigRefHandle ref, long flags){
  432. #pragma options align=mac68k
  433.     struct GlueParms {
  434.         long flags;
  435.         ICConfigRefHandle ref;
  436.     };
  437.     
  438.     typedef struct GlueParms GlueParms;
  439.     
  440.     struct ICCallGlue {
  441.         PPC_Glue(GlueParms);
  442.     };
  443.     
  444.     typedef struct ICCallGlue ICCallGlue;
  445. #pragma options align=reset
  446.     
  447.     ICCallGlue glue;
  448.     
  449.     SetupGlue(glue,kICCSetConfigReference,GlueParms,inst);
  450.     
  451.     SetGlueParm(glue,flags,flags);
  452.     SetGlueParm(glue,ref,ref);
  453.     
  454.     return CallComponentGlue(&glue);
  455. }
  456.  
  457. /*
  458.     
  459.     PPC glue to call the component with the correct selector.
  460. */
  461. pascal ICError ICCSpecifyConfigFile(internetConfigurationComponent inst, FSSpec *config){
  462. #pragma options align=mac68k
  463.     struct GlueParms {
  464.         FSSpec* config;
  465.     };
  466.     
  467.     typedef struct GlueParms GlueParms;
  468.     
  469.     struct ICCallGlue {
  470.         PPC_Glue(GlueParms);
  471.     };
  472.     
  473.     typedef struct ICCallGlue ICCallGlue;
  474. #pragma options align=reset
  475.     
  476.     ICCallGlue glue;
  477.     
  478.     SetupGlue(glue,kICCSpecifyConfigFile,GlueParms,inst);
  479.     
  480.     SetGlueParm(glue,config,config);
  481.     
  482.     return CallComponentGlue(&glue);
  483. }
  484.  
  485. /*
  486.     
  487.     PPC glue to call the component with the correct selector.
  488. */
  489. pascal ICError ICCGetSeed(internetConfigurationComponent inst, long *seed){
  490. #pragma options align=mac68k
  491.     struct GlueParms {
  492.         long* seed;
  493.     };
  494.     
  495.     typedef struct GlueParms GlueParms;
  496.     
  497.     struct ICCallGlue {
  498.         PPC_Glue(GlueParms);
  499.     };
  500.     
  501.     typedef struct ICCallGlue ICCallGlue;
  502. #pragma options align=reset
  503.     
  504.     ICCallGlue glue;
  505.     
  506.     SetupGlue(glue,kICCGetSeed,GlueParms,inst);
  507.     
  508.     SetGlueParm(glue,seed,seed);
  509.     
  510.     return CallComponentGlue(&glue);
  511. }
  512.  
  513. /*
  514.     
  515.     PPC glue to call the component with the correct selector.
  516. */
  517. pascal ICError ICCGetPerm(internetConfigurationComponent inst, ICPerm *perm){
  518. #pragma options align=mac68k
  519.     struct GlueParms {
  520.         ICPerm* perm;
  521.     };
  522.     
  523.     typedef struct GlueParms GlueParms;
  524.     
  525.     struct ICCallGlue {
  526.         PPC_Glue(GlueParms);
  527.     };
  528.     
  529.     typedef struct ICCallGlue ICCallGlue;
  530. #pragma options align=reset
  531.     
  532.     ICCallGlue glue;
  533.     
  534.     SetupGlue(glue,kICCGetPerm,GlueParms,inst);
  535.     
  536.     SetGlueParm(glue,perm,perm);
  537.     
  538.     return CallComponentGlue(&glue);
  539.     
  540. }
  541.  
  542. /*
  543.     
  544.     PPC glue to call the component with the correct selector.
  545. */
  546. pascal ICError ICCBegin(internetConfigurationComponent inst, ICPerm perm){
  547. #pragma options align=mac68k
  548.     struct GlueParms {
  549.         ICPerm perm;
  550.         char filler0;
  551.     };
  552.     
  553.     typedef struct GlueParms GlueParms;
  554.     
  555.     struct ICCallGlue {
  556.         PPC_Glue(GlueParms);
  557.     };
  558.     
  559.     typedef struct ICCallGlue ICCallGlue;
  560. #pragma options align=reset
  561.     
  562.     ICCallGlue glue;
  563.     
  564.     SetupGlue(glue,kICCBegin,GlueParms,inst);
  565.     
  566.     SetGlueParm(glue,perm,perm);
  567.     SetGlueParm(glue,filler0,0);
  568.     
  569.     return CallComponentGlue(&glue);
  570. }
  571.  
  572. /*
  573.     
  574.     PPC glue to call the component with the correct selector.
  575. */
  576. pascal ICError ICCGetPref(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Ptr buf, long *size){
  577. #pragma options align=mac68k
  578.     struct GlueParms {
  579.         long* size;
  580.         Ptr buf;
  581.         ICAttr* attr;
  582.         StringPtr key;
  583.     };
  584.     
  585.     typedef struct GlueParms GlueParms;
  586.     
  587.     struct ICCallGlue {
  588.         PPC_Glue(GlueParms);
  589.     };
  590.     
  591.     typedef struct ICCallGlue ICCallGlue;
  592. #pragma options align=reset
  593.     
  594.     ICCallGlue glue;
  595.     
  596.     SetupGlue(glue,kICCGetPref,GlueParms,inst);
  597.     
  598.     SetGlueParm(glue,size,size);
  599.     SetGlueParm(glue,buf,buf);
  600.     SetGlueParm(glue,attr,attr);
  601.     SetGlueParm(glue,key,key);
  602.     
  603.     return CallComponentGlue(&glue);
  604. }
  605.  
  606. /*
  607.     
  608.     PPC glue to call the component with the correct selector.
  609. */
  610. pascal ICError ICCSetPref(internetConfigurationComponent inst,StringPtr key, ICAttr attr, Ptr buf, long size){
  611. #pragma options align=mac68k
  612.     struct GlueParms {
  613.         long size;
  614.         Ptr buf;
  615.         ICAttr attr;
  616.         StringPtr key;
  617.     };
  618.     
  619.     typedef struct GlueParms GlueParms;
  620.     
  621.     struct ICCallGlue {
  622.         PPC_Glue(GlueParms);
  623.     };
  624.     
  625.     typedef struct ICCallGlue ICCallGlue;
  626. #pragma options align=reset
  627.     
  628.     ICCallGlue glue;
  629.     
  630.     SetupGlue(glue,kICCSetPref,GlueParms,inst);
  631.     
  632.     SetGlueParm(glue,size,size);
  633.     SetGlueParm(glue,buf,buf);
  634.     SetGlueParm(glue,attr,attr);
  635.     SetGlueParm(glue,key,key);
  636.     
  637.     return CallComponentGlue(&glue);
  638. }
  639.  
  640. /*
  641.     
  642.     PPC glue to call the component with the correct selector.
  643. */
  644. pascal ICError ICCFindPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Handle prefh){
  645. #pragma options align=mac68k
  646.     struct GlueParms {
  647.         Handle prefh;
  648.         ICAttr* attr;
  649.         StringPtr key;
  650.     };
  651.     
  652.     typedef struct GlueParms GlueParms;
  653.     
  654.     struct ICCallGlue {
  655.         PPC_Glue(GlueParms);
  656.     };
  657.     
  658.     typedef struct ICCallGlue ICCallGlue;
  659. #pragma options align=reset
  660.     
  661.     ICCallGlue glue;
  662.     
  663.     SetupGlue(glue,kICCFindPrefHandle,GlueParms,inst);
  664.     
  665.     SetGlueParm(glue,attr,attr);
  666.     SetGlueParm(glue,prefh,prefh);
  667.     SetGlueParm(glue,key,key);
  668.     
  669.     return CallComponentGlue(&glue);
  670. }
  671.  
  672. /*
  673.     
  674.     PPC glue to call the component with the correct selector.
  675. */
  676. pascal ICError ICCGetPrefHandle(internetConfigurationComponent inst,StringPtr key, ICAttr *attr, Handle *prefh){
  677. #pragma options align=mac68k
  678.     struct GlueParms {
  679.         Handle* prefh;
  680.         ICAttr* attr;
  681.         StringPtr key;
  682.     };
  683.     
  684.     typedef struct GluePe,kICCEditPreferences,GlueParms,inst);
  685.     
  686.     SetGlueParm(glue,key,key);
  687.     
  688.     return CallComponentGlue(&glue);
  689. }
  690.  
  691. /*
  692.     
  693.     PPC glue to call the component with the correct selector.
  694. */
  695. pascal ICError ICCParseURL(internetConfigurationComponent inst,StringPtr hint, Ptr data, long len,
  696.         long *selStart, long *selEnd, Handle url){
  697. #pragma options align=mac68k
  698.     struct GlueParms {
  699.         Handle url;
  700.         long* selEnd;
  701.         long* selStart;
  702.         long len;
  703.         Ptr data;
  704.         StringPtr hint;
  705.     };
  706.     
  707.     typedef struct GlueParms GlueParms;
  708.     
  709.     struct ICCallGlue {
  710.         PPC_Glue(GlueParms);
  711.     };
  712.     
  713.     typedef struct ICCallGlue ICCallGlue;
  714. #pragma options align=reset
  715.     
  716.     ICCallGlue glue;
  717.     
  718.     SetupGlue(glue,kICCParseURL,GlueParms,inst);
  719.     
  720.     SetGlueParm(glue,url,url);
  721.     SetGlueParm(glue,selEnd,selEnd);
  722.     SetGlueParm(glue,selStart,selStart);
  723.     SetGlueParm(glue,len,len);
  724.     SetGlueParm(glue,hint,hint);
  725.     SetGlueParm(glue,data,data);
  726.     
  727.     return CallComponentGlue(&glue);
  728. }
  729.  
  730. /*
  731.     
  732.     PPC glue to call the component with the correct selector.
  733. */
  734. pascal ICError ICCLaunchURL(internetConfigurationComponent inst,StringPtr hint, Ptr data, long len,
  735.     long *selStart, long *selEnd){
  736. #pragma options align=mac68k
  737.     struct GlueParms {
  738.         long* selEnd;
  739.         long* selStart;
  740.         long len;
  741.         Ptr data;
  742.         StringPtr hint;
  743.     };
  744.     
  745.     typedef struct GlueParms GlueParms;
  746.     
  747.     struct ICCallGlue {
  748.         PPC_Glue(GlueParms);
  749.     };
  750.     
  751.     typedef struct ICCallGlue ICCallGlue;
  752. #pragma options align=reset
  753.     
  754.     ICCallGlue glue;
  755.     
  756.     SetupGlue(glue,kICCLaunchURL,GlueParms,inst);
  757.     
  758.     SetGlueParm(glue,selEnd,selEnd);
  759.     SetGlueParm(glue,selStart,selStart);
  760.     SetGlueParm(glue,len,len);
  761.     SetGlueParm(glue,hint,hint);
  762.     SetGlueParm(glue,data,data);
  763.     
  764.     return CallComponentGlue(&glue);
  765. }
  766.  
  767. /*
  768.     
  769.     PPC glue to call the component with the correct selector.
  770. */
  771. pascal ICError ICCMapFilename(internetConfigurationComponent inst,StringPtr filename, ICMapEntry *entry){
  772. #pragma options align=mac68k
  773.     struct GlueParms {
  774.         ICMapEntry* entry;
  775.         StringPtr filename;
  776.     };
  777.     
  778.     typedef struct GlueParms GlueParms;
  779.     
  780.     struct ICCallGlue {
  781.         PPC_Glue(GlueParms);
  782.     };
  783.     
  784.     typedef struct ICCallGlue ICCallGlue;
  785. #pragma options align=reset
  786.     
  787.     ICCallGlue glue;
  788.     
  789.     SetupGlue(glue,kICCMapFilename,GlueParms,inst);
  790.     
  791.     SetGlueParm(glue,entry,entry);
  792.     SetGlueParm(glue,filename,filename);
  793.     
  794.     return CallComponentGlue(&glue);
  795. }
  796.  
  797. /*
  798.     
  799.     PPC glue to call the component with the correct selector.
  800. */
  801. pascal ICError ICCMapTypeCreator(internetConfigurationComponent inst, OSType fType, OSType fCreator,StringPtr filename,
  802.     ICMapEntry *entry){
  803. #pragma options align=mac68k
  804.     struct GlueParms {
  805.         ICMapEntry* entry;
  806.         StringPtr filename;
  807.         OSType fCreator;
  808.         OSType fType;
  809.     };
  810.     
  811.     typedef struct GlueParms GlueParms;
  812.     
  813.     struct ICCallGlue {
  814.         PPC_Glue(GlueParms);
  815.     };
  816.     
  817.     typedef struct ICCallGlue ICCallGlue;
  818. #pragma options align=reset
  819.     
  820.     ICCallGlue glue;
  821.     
  822.     SetupGlue(glue,kICCMapTypeCreator,GlueParms,inst);
  823.     
  824.     SetGlueParm(glue,entry,entry);
  825.     SetGlueParm(glue,fCreator,fCreator);
  826.     SetGlueParm(glue,fType,fType);
  827.     SetGlueParm(glue,filename,filename);
  828.     
  829.     return CallComponentGlue(&glue);
  830. }
  831.  
  832. /*
  833.     
  834.     PPC glue to call the component with the correct selector.
  835. */
  836. pascal ICError ICCMapEntriesFilename(internetConfigurationComponent inst, Handle entries,StringPtr filename, ICMapEntry *entry){
  837. #pragma options align=mac68k
  838.     struct GlueParms {
  839.         ICMapEntry* entry;
  840.         StringPtr filename;
  841.         Handle entries;
  842.     };
  843.     
  844.     typedef struct GlueParms GlueParms;
  845.     
  846.     struct ICCallGlue {
  847.         PPC_Glue(GlueParms);
  848.     };
  849.     
  850.     typedef struct ICCallGlue ICCallGlue;
  851. #pragma options align=reset
  852.     
  853.     ICCallGlue glue;
  854.     
  855.     SetupGlue(glue,kICCMapEntriesFilename,GlueParms,inst);
  856.     
  857.     SetGlueParm(glue,entry,entry);
  858.     SetGlueParm(glue,entries,entries);
  859.     SetGlueParm(glue,filename,filename);
  860.     
  861.     return CallComponentGlue(&glue);
  862. }
  863.  
  864. /*
  865.     
  866.     PPC glue to call the component with the correct selector.
  867. */
  868. pascal ICError ICCMapEntriesTypeCreator(internetConfigurationComponent inst, Handle entries, OSType fType, OSType fCreator,
  869.         StringPtr filename, ICMapEntry *entry){
  870. #pragma options align=mac68k
  871.     struct GlueParms {
  872.         ICMapEntry* entry;
  873.         StringPtr filename;
  874.         OSType fCreator;
  875.         OSType fType;
  876.         Handle entries;
  877.     };
  878.     
  879.     typedef struct GlueParms GlueParms;
  880.     
  881.     struct ICCallGlue {
  882.         PPC_Glue(GlueParms);
  883.     };
  884.     
  885.     typedef struct ICCallGlue ICCallGlue;
  886. #pragma options align=reset
  887.     
  888.     ICCallGlue glue;
  889.     
  890.     SetupGlue(glue,kICCMapEntriesTypeCreator,GlueParms,inst);
  891.     
  892.     SetGlueParm(glue,entry,entry);
  893.     SetGlueParm(glue,fCreator,fCreator);
  894.     SetGlueParm(glue,entries,entries);
  895.     SetGlueParm(glue,fType,fType);
  896.     SetGlueParm(glue,filename,filename);
  897.     
  898.     return CallComponentGlue(&glue);
  899. }
  900.  
  901. /*
  902.     
  903.     PPC glue to call the component with the correct selector.
  904. */
  905. pascal ICError ICCCountMapEntries(internetConfigurationComponent inst, Handle entries, long *count){
  906. #pragma options align=mac68k
  907.     struct GlueParms {
  908.         long* count;
  909.         Handle entries;
  910.     };
  911.     
  912.     typedef struct GlueParms GlueParms;
  913.     
  914.     struct ICCallGlue {
  915.         PPC_Glue(GlueParms);
  916.     };
  917.     
  918.     typedef struct ICCallGlue ICCallGlue;
  919. #pragma options align=reset
  920.     
  921.     ICCallGlue glue;
  922.     
  923.     SetupGlue(glue,kICCCountMapEntries,GlueParms,inst);
  924.     
  925.     SetGlueParm(glue,count,count);
  926.     SetGlueParm(glue,entries,entries);
  927.     
  928.     return CallComponentGlue(&glue);
  929. }
  930.  
  931. /*
  932.     
  933.     PPC glue to call the component with the correct selector.
  934. */
  935. pascal ICError ICCGetIndMapEntry(internetConfigurationComponent inst, Handle entries, long ndx, long *pos, ICMapEntry *entry){
  936. #pragma options align=mac68k
  937.     struct GlueParms {
  938.         ICMapEntry* entry;
  939.         long* pos;
  940.         long ndx;
  941.         Handle entries;
  942.     };
  943.     
  944.     typedef struct GlueParms GlueParms;
  945.     
  946.     struct ICCallGlue {
  947.         PPC_Glue(GlueParms);
  948.     };
  949.     
  950.     typedef struct ICCallGlue ICCallGlue;
  951. #pragma options align=reset
  952.     
  953.     ICCallGlue glue;
  954.     
  955.     SetupGlue(glue,kICCGetIndMapEntry,GlueParms,inst);
  956.     
  957.     SetGlueParm(glue,entry,entry);
  958.     SetGlueParm(glue,pos,pos);
  959.     SetGlueParm(glue,ndx,ndx);
  960.     SetGlueParm(glue,entries,entries);
  961.     
  962.     return CallComponentGlue(&glue);
  963. }
  964.  
  965. /*
  966.     
  967.     PPC glue to call the component with the correct selector.
  968. */
  969. pascal ICError ICCGetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry){
  970. #pragma options align=mac68k
  971.     struct GlueParms {
  972.         ICMapEntry* entry;
  973.         long pos;
  974.         Handle entries;
  975.     };
  976.     
  977.     typedef struct GlueParms GlueParms;
  978.     
  979.     struct ICCallGlue {
  980.         PPC_Glue(GlueParms);
  981.     };
  982.     
  983.     typedef struct ICCallGlue ICCallGlue;
  984. #pragma options align=reset
  985.     
  986.     ICCallGlue glue;
  987.     
  988.     SetupGlue(glue,kICCGetMapEntry,GlueParms,inst);
  989.     
  990.     SetGlueParm(glue,entry,entry);
  991.     SetGlueParm(glue,pos,pos);
  992.     SetGlueParm(glue,entries,entries);
  993.     
  994.     return CallComponentGlue(&glue);
  995.     
  996. }
  997.  
  998. /*
  999.     
  1000.     PPC glue to call the component with the correct selector.
  1001. */
  1002. pascal ICError ICCSetMapEntry(internetConfigurationComponent inst, Handle entries, long pos, ICMapEntry *entry){
  1003. #pragma options align=mac68k
  1004.     struct GlueParms {
  1005.         ICMapEntry* entry;
  1006.         long pos;
  1007.         Handle entries;
  1008.     };
  1009.     
  1010.     typedef struct GlueParms GlueParms;
  1011.     
  1012.     struct ICCallGlue {
  1013.         PPC_Glue(GlueParms);
  1014.     };
  1015.     
  1016.     typedef struct ICCallGlue ICCallGlue;
  1017. #pragma options align=reset
  1018.     
  1019.     ICCallGlue glue;
  1020.     
  1021.     SetupGlue(glue,kICCSetMapEntry,GlueParms,inst);
  1022.     
  1023.     SetGlueParm(glue,entry,entry);
  1024.     SetGlueParm(glue,pos,pos);
  1025.     SetGlueParm(glue,entries,entries);
  1026.     
  1027.     return CallComponentGlue(&glue);
  1028. }
  1029.  
  1030. /*
  1031.     
  1032.     PPC glue to call the component with the correct selector.
  1033. */
  1034. pascal ICError ICCDeleteMapEntry(internetConfigurationComponent inst, Handle entries, long pos){
  1035. #pragma options align=mac68k
  1036.     struct GlueParms {
  1037.         long pos;
  1038.         Handle entries;
  1039.     };
  1040.     
  1041.     typedef struct GlueParms GlueParms;
  1042.     
  1043.     struct ICCallGlue {
  1044.         PPC_Glue(GlueParms);
  1045.     };
  1046.     
  1047.     typedef struct ICCallGlue ICCallGlue;
  1048. #pragma options align=reset
  1049.     
  1050.     ICCallGlue glue;
  1051.     
  1052.     SetupGlue(glue,kICCDeleteMapEntry,GlueParms,inst);
  1053.     
  1054.     SetGlueParm(glue,pos,pos);
  1055.     SetGlueParm(glue,entries,entries);
  1056.     
  1057.     return CallComponentGlue(&glue);
  1058. }
  1059.  
  1060. /*
  1061.     
  1062.     PPC glue to call the component with the correct selector.
  1063. */
  1064. pascal ICError ICCAddMapEntry(internetConfigurationComponent inst, Handle entries, ICMapEntry *entry){
  1065. #pragma options align=mac68k
  1066.     struct GlueParms {
  1067.         ICMapEntry* entry;
  1068.         Handle entries;
  1069.     };
  1070.     
  1071.     typedef struct GlueParms GlueParms;
  1072.     
  1073.     struct ICCallGlue {
  1074.         PPC_Glue(GlueParms);
  1075.     };
  1076.     
  1077.     typedef struct ICCallGlue ICCallGlue;
  1078. #pragma options align=reset
  1079.     
  1080.     ICCallGlue glue;
  1081.     
  1082.     SetupGlue(glue,kICCAddMapEntry,GlueParms,inst);
  1083.     
  1084.     SetGlueParm(glue,entry,entry);
  1085.     SetGlueParm(glue,entries,entries);
  1086.     
  1087.     return CallComponentGlue(&glue);
  1088. }
  1089.  
  1090. #endif /* USESROUTINEDESCRIPTORS */
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.